﻿@using BugChang.DES.Web.Mvc.Models.Common
<div class="box box-primary">
    <div class="box-header with-border">
        <div class="btn-group">
            <button id="btnAddClient" type="button" class="btn btn-primary" data-toggle="modal" data-target="#ClientCreateModal" data-backdrop="static" data-keyboard="false"><i class="fa  fa-plus-circle"></i> 新增</button>
            <button id="btnRefresh" type="button" class="btn btn-primary"><i class="fa  fa-refresh"></i> 刷新</button>
        </div>
    </div>
    <div class="box-body">
        <div class="table-responsive">
            <table id="table" class="table table-bordered table-hover text-nowrap"></table>
        </div>
    </div>
</div>
<div class="modal fade" id="ClientCreateModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <form id="ClientCreateForm" method="post" asp-controller="Client" asp-action="Create">
                @Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel("新增客户端"))
                <div class="modal-body">
                    <div class="form-group">
                        <label>名称</label>
                        <input type="text" class="form-control" name="Name">
                    </div>

                    <div class="form-group">
                        <label>设备编码</label>
                        <div class="input-group">
                            <input type="text" class="form-control device-code" name="DeviceCode">
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-primary btn-device-code">点击获取本机设备码</button>
                            </span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>客户端类型</label>
                        <select name="ClientType" class="form-control">
                            <option value="0">自助终端</option>
                            <option value="1">个人终端</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>默认首页</label>
                        <input class="form-control" name="HomePage" value="/Home/Index" placeholder="登录后的界面，如：/Home/Index" />
                    </div>

                    <div class="form-group">
                        <label>交换场所</label>
                        <select name="PlaceId" class="form-control place-select" style="width: 100%"></select>
                    </div>
                    @Html.Partial("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
                </div>
            </form>
        </div>
    </div>
</div>
<div class="modal fade" id="ClientEditModal" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">

        </div>
    </div>
</div>

@section scripts
    {
    <script src="~/views-resource/client/index.js" asp-append-version="true"></script>
}